package com.jshan.base.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("sys_operation_log")
@Schema(description = "系统操作日志实体")
public class SysOperationLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "日志ID")
    private Long id;

    /**
     * 操作人用户名
     */
    @Schema(description = "操作人用户名")
    private String username;

    /**
     * 操作描述
     */
    @Schema(description = "操作描述")
    private String operation;

    /**
     * 请求方法名
     */
    @Schema(description = "请求方法名")
    private String method;

    /**
     * 请求参数
     */
    @Schema(description = "请求参数")
    private String params;

    /**
     * 执行时长(毫秒)
     */
    @Schema(description = "执行时长(毫秒)")
    private Long time;

    /**
     * 操作IP
     */
    @Schema(description = "操作IP地址")
    private String ip;

    /**
     * 请求URL
     */
    @Schema(description = "请求URL")
    private String url;

    /**
     * 操作状态 0：失败 1：成功
     */
    @Schema(description = "操作状态(0:失败 1:成功)")
    private Integer status;

    /**
     * 错误信息
     */
    @Schema(description = "错误信息")
    private String errorMsg;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Date createTime;

}
